package com.sservice.service.service;

import com.sservice.model.entity.Purchase;
import com.sservice.model.vo.PurchaseVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface PurchaseService {
    int deleteByPrimaryKey(Integer id);

    int insert(Purchase record);

    int insertSelective(Purchase record);

    Purchase selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Purchase record);

    int updateByPrimaryKey(Purchase record);

    /**
     * 报表统计
     *
     * @return
     */
    Map<String, Object> report();

    int queryCount(PurchaseVo record);

    List<PurchaseVo> queryByPage(PurchaseVo record);

    /**
     *  采购单数量变更
     * @param id
     * @param number
     * @param charged
     * @param charging
     * @return
     */
    int changeNumber(Integer id, BigDecimal number, BigDecimal charged, BigDecimal charging);
}